@extends('layouts.default')
@section('seo-title', $seo['seo_title'])
@section('seo-description',$seo['seo_description'])
@section('seo-keywords',$seo['seo_keyword'])
@section('company',$abbreviation)
@section('link-css')
    <link rel="stylesheet" href="/css/publicStyle/index.css">
@endsection
@section('content')
    {{--    首页轮播图--}}
    <section class="home-slider owl-carousel">
        @foreach($slideShow as $item)
            <div class="slider-item" style="background-image: url({{$item['url']}});">
                <div class="overlay"></div>
                <div class="container">
                    <div class="row slider-text justify-content-start align-items-center" data-scrollax-parent="true">
                        <div class="col-md-8 col-lg-7 col-sm-12 ftco-animate text mb-4"
                             data-scrollax=" properties: { translateY: '70%' }">
                            <p>
                                <a href="{{route('getModelDetails', [$item['id']])}}" class="btn btn-primary px-4 py-3">了解更多</a>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        @endforeach
    </section>
    {{--    公司简介--}}
    <section class="ftco-section-2">
        <div class="container-fluid">
            <div class="section-2-blocks-wrapper d-flex row no-gutters">
                <div class="img col-md-6 ftco-animate" style="background-image: url({{$companyImage}});">
                </div>
                <div class="text col-md-6 ftco-animate">
                    <div class="text-inner align-self-start">
                        <h3 class="heading">{{$companyTitle}}</h3>
                        <p>{{$companyProfile}}</p>
                        <ul class="my-4">
                            @foreach($companyAdvantage as $item)
                                <li><span class="ion-ios-checkmark-circle mr-2"></span> {{$item}}</li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>
    {{--  模特推荐  --}}
    <section class="ftco-section-2">
        <div class="container-fluid">
            <div class="row d-flex no-gutters">
                <div class="col-md-6 d-flex align-items-center heading-section ftco-animate bg-light">
                    <div class="col-md-9">
                        <div class="p-5">
                            <h2 class="mb-4">{{$allModelTitle}}</h2>
                            <p>{{$allModelDesc}} </p>
                        </div>
                    </div>
                </div>
                @foreach($product as $item)
                    <div class="col-md-3 model-entry ftco-animate">
                        <div class="model-img" style="background-image: url({{$item['image']}});">
                            <div class="name">
                                <h3><a href="{{route('getModelDetails', [$item['id']])}}">{{$item['title']}}</a></h3>
                            </div>
                            <div class="text">
                                <h3><a href="{{route('getModelDetails', [$item['id']])}}">{{$item['title']}}</a></h3>
                                <div class="d-flex models-info">
                                    <div class="pr-md-3">
                                        <p>身高</p>
                                        <span>{{$item['height']}}</span>
                                    </div>
                                    <div class="pr-md-3">
                                        <p>胸围</p>
                                        <span>{{$item['bust']}}</span>
                                    </div>
                                    <div class="pr-md-3">
                                        <p>腰围</p>
                                        <span>{{$item['waist']}}</span>
                                    </div>
                                    <div class="pr-md-3">
                                        <p>臀围</p>
                                        <span>{{$item['hips']}}</span>
                                    </div>
                                    <div class="pr-md-3">
                                        <p>鞋子</p>
                                        <span>{{$item['shoe']}}</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                @endforeach
                <div class="col-md-3 d-flex justify-content-center align-items-center bg-light ftco-animate">
                    <div class="btn-view">
                        <p><a href="{{route('allModel')}}">所有模特</a></p>
                    </div>
                </div>
            </div>
        </div>
    </section>
    @if($articleYes)
        {{--新闻资讯--}}
        <section class="ftco-section">
            <div class="container">
                <div class="row d-flex">
                    <div class="col-md-3 mb-5 heading-section ftco-animate">
                        <h2 class="mb-4">行业资讯</h2>
                        <p class="mb-5">关注行业动态，了解行业信息 </p>
                        <p class="btn-view"><a href="{{route('newsList')}}">查看更多</a></p>
                    </div>
                    @foreach($article as $item)
                        <div class="col-md-3 d-flex ftco-animate">
                            <div class="blog-entry align-self-stretch">
                                <a href="{{route('newsDetails', [$item['id']])}}" class="block-20"
                                   style="background-image: url({{$item['image']}});">
                                </a>
                                <div class="text pt-4 d-block">
                                    <div class="meta mb-3">
                                        <div>
                                            <a href="{{route('newsDetails', [$item['id']])}}">{{$item['created_at']}}</a>
                                        </div>
                                        <div><a href="{{route('newsDetails', [$item['id']])}}" class="meta-chat"><span
                                                    class="icon-chat"></span> {{$item['number']}}</a></div>
                                    </div>
                                    <h3 class="heading mt-3"><a
                                            href="{{route('newsDetails', [$item['id']])}}">{{$item['title']}}</a></h3>
                                </div>
                            </div>
                        </div>
                    @endforeach
                </div>
            </div>
        </section>
    @endif
    <!--视频内容-->
    @if($videos['url'])
        <div class="index-video-content">
            <div class="video-cover">
                <img class="cover" src="{{$videos['image']}}" alt="">
                <img class="video-icon" data-id="1"
                     src="http://mj.website.vodegroup.com/image/video_play.png" alt="">
            </div>
            <div class="video-hide">
                <video id="index-video" width="320" height="240" controls poster="{{$videos['image']}}"
                       style="object-fit: fill">
                    <source
                        src="{{$videos['url']}}"
                        type="video/mp4">
                </video>
            </div>
        </div>
    @endif
@endsection
@section('link-js')
    <script>
        var Media = document.getElementById("index-video");
        $('.index-video-content .video-icon').click(function () {
            var id = $(this).data('id');
            $('.index-video-content .video-hide').show();
            $('.index-video-content .video-cover').hide();
            Media.play();
            clickVideoNumber(1)
        });
    </script>
@endsection
